﻿@model MVC_登陆登出及验证.Models.LoginViewModels

@{
    Layout = null;
}

<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <title>Login</title>
</head>
<body>
    @using (Html.BeginForm("Login","Account",FormMethod.Post)) 
    {
        @Html.AntiForgeryToken()
        
        <div class="form-horizontal">
            <h4>欢迎登陆</h4>
            <hr />
            @Html.ValidationSummary(true, "", new { @class = "text-danger" })
            <div class="form-group">
                @Html.LabelFor(model => model.UName, htmlAttributes: new { @class = "control-label col-md-2" })
                <div class="col-md-10">
                    @Html.TextBoxFor(model => model.UName, new { htmlAttributes = new { @class = "form-control" } })
                    @Html.ValidationMessageFor(model => model.UName, "", new { @class = "text-danger" })
                </div>
            </div>
    
            <div class="form-group">
                @Html.LabelFor(model => model.Password, htmlAttributes: new { @class = "control-label col-md-2" })
                <div class="col-md-10">
                    @Html.TextBoxFor(model => model.Password, new { htmlAttributes = new { @class = "form-control" } })
                    @Html.ValidationMessageFor(model => model.Password, "", new { @class = "text-danger" })
                </div>
            </div>
    
           
    
            <div class="form-group">
                @Html.LabelFor(model => model.Rememberme, htmlAttributes: new { @class = "control-label col-md-2" })
                <div class="col-md-10">
                    <div class="checkbox">
                        @Html.EditorFor(model => model.Rememberme)
                        @Html.ValidationMessageFor(model => model.Rememberme, "", new { @class = "text-danger" })
                    </div>
                </div>
            </div>
    
            <div class="form-group">
                <div class="col-md-offset-2 col-md-10">
                    <input type="submit" value="登陆" class="btn btn-default" />
                </div>
            </div>
        </div>
    }
    <div>
       session: @Session["UName"]
    </div>
    <div>
       <!-- @Html.ActionLink("Back to List", "Index")-->
    </div>
</body>
</html>
